//k1 edit 21.12.03

if (isNil "A3E_MortarMarkerNumber") then {
	A3E_MortarMarkerNumber = 0;
} else {
	A3E_MortarMarkerNumber = A3E_MortarMarkerNumber + 1;
};
_number = A3E_MortarMarkerNumber;

_position = [_this,0] call bis_fnc_param;

private["_obj","_objpos","_dir","_gunner"];

_objpos = _position vectorAdd [3.8,-0.56,-0.01];
_obj = "Land_BagFence_End_F" createvehicle _objpos;
_dir = 320.86;
_obj setdir _dir;
_obj setpos _objpos;
_objpos = _position vectorAdd [2.314,-1.724,-0.01];
_obj = "Land_BagFence_Long_F" createvehicle _objpos;
_dir = 321.1;
_obj setdir _dir;
_obj setpos _objpos;
_objpos = _position vectorAdd [1.564,3.356,-0.01];
_obj = "Land_BagFence_Long_F" createvehicle _objpos;
_dir = 0.48;
_obj setdir _dir;
_obj setpos _objpos;
_objpos = _position vectorAdd [-0.066,-2.914,-0.01];
_obj = "Land_BagFence_Round_F" createvehicle _objpos;
_dir = 0;
_obj setdir _dir;
_obj setpos _objpos;

_objpos = _position vectorAdd [-0.11,-0.184,0.1];
_obj = createVehicle [a3e_arr_MortarSite select(floor(random(count(a3e_arr_MortarSite)))), _objpos, [], 0, "NONE"];
_gunner = [_obj,A3E_VAR_Side_Opfor] spawn A3E_fnc_AddStaticGunner; 
a3e_var_artillery_units pushBack _obj;
Escape_all_assets pushback _obj;
_obj setVariable ["Escape_assets_control", true, true]; //

_dir = 180.6;
_obj setdir _dir;
_obj setpos _objpos;
_objpos = _position vectorAdd [-1.456,3.446,0];
_obj = "Land_BagFence_Long_F" createvehicle _objpos;
_dir = 180;
_obj setdir _dir;
_obj setpos _objpos;
_objpos = _position vectorAdd [-2.366,-1.42,0];
_obj = "Land_BagFence_Long_F" createvehicle _objpos;
_dir = 47.6;
_obj setdir _dir;
_obj setpos _objpos;
_objpos = _position vectorAdd [-3.666,0,0];
_obj = "Land_BagFence_End_F" createvehicle _objpos;
_dir = 230;
_obj setdir _dir;
_obj setpos _objpos;

_objpos = _position vectorAdd [2.5,.5,.1];
_obj = "Box_NATO_AmmoOrd_F" createVehicle _objpos;
_obj allowDamage false;
_obj setDir 180;
_obj setpos _objpos;
_objpos = _position vectorAdd [1,1.5,.1];
_obj = "Box_NATO_WpsLaunch_F" createVehicle _objpos;
_obj allowDamage false;
_obj setDir 180;
_obj setpos _objpos;


["A3E_MortarSiteMapMarker" + str _number,_position,"o_mortar"] call A3E_fnc_createLocationMarker;

_marker = createMarkerLocal ["A3E_MortarSitePatrolMarker" + str _number, _position];
_marker setMarkerShapeLocal "ELLIPSE";
_marker setMarkerAlpha 0;
_marker setMarkerSizeLocal [50,50];


